﻿<UserControl x:Class="WowModelExplorer.Controls.MapModelNames"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:data="clr-namespace:WowModelExplorer.Data"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="500"
             d:DesignWidth="300"
             mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="1" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid Name="_m2Grid">
            <Grid.Resources>
                <data:EntryCollection x:Key="_m2Names" />
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="23" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Border>
                    <TextBox Name="_m2filter"
                             Margin="1,1,1,1"
                             TextChanged="m2filter_TextChanged" />
                </Border>
            </Grid>
            <ListView Name="_m2listView"
                      Grid.Row="1"
                      ItemsSource="{Binding Source={StaticResource _m2Names}}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="180" DisplayMemberBinding="{Binding Path=Name}">
                            <GridViewColumnHeader Tag="Name" Content="{DynamicResource m2Names}"/>
                        </GridViewColumn>
                        <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=Id}">
                            <GridViewColumnHeader Tag="Id" Content="{DynamicResource id}"/>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>
        </Grid>

        <GridSplitter Grid.Row="1"
                      Height="1"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Top"
                      Background="{DynamicResource EdgeBorderBrush}" />
        
        <Grid Name="_wmoLocalGrid" Grid.Row="2">
            <Grid.Resources>
                <data:EntryCollection x:Key="_wmoLocalNames" />
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="23" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Border>
                    <TextBox Name="_wmoLocalfilter"
                             Margin="1,1,1,1"
                             TextChanged="wmoLocalfilter_TextChanged" />
                </Border>
            </Grid>
            <ListView Name="_wmoLocalListView"
                      Grid.Row="1"
                      ItemsSource="{Binding Source={StaticResource _wmoLocalNames}}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="180" DisplayMemberBinding="{Binding Path=Name}">
                            <GridViewColumnHeader Tag="Name" Content="{DynamicResource wmoNames}"/>
                        </GridViewColumn>
                        <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=Id}">
                            <GridViewColumnHeader Tag="Id" Content="{DynamicResource id}"/>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>
        </Grid>

    </Grid>
</UserControl>
